<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2020/1/30
  Time: 15:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<html>--%>
<html class="loginHtml">
<head>
    <meta charset="utf-8">
    <title>登录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="icon" href="${ctx}/resources/favicon.ico">
    <link rel="stylesheet" href="${ctx}/resources/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/resources/css/public.css" media="all"/>

    <%--123  --%>
    <%--<link rel="stylesheet" type="text/css" href="${ctx}/resources/Xcss/normalize.css"/>--%>
    <%--<link rel="stylesheet" type="text/css" href="${ctx}/resources/Xcss/demo.css"/>--%>
    <%--<!--必要样式-->--%>
    <link rel="stylesheet" type="text/css" href="${ctx}/resources/Xcss/component.css"/>
    <%--<!--[if IE]>--%>
    <%--<script src="${ctx}/resources/Xjs/html5.js"></script>--%>
    <%--<![endif]-->--%>

    <%--展开0--%>

    <style type="text/css">
        body21 {
            cursor: crosshair;
            /*background: #111;*/
            margin: 0;
            padding: 0;
            position: absolute;
            overflow: hidden;
            font-family: "华文楷体";
            left: 0%;
            top: 0%;
            width: 70%;
            height: 100%;
        }

        .link {
            position: absolute;
            left: 0%;
            top: 0%;
            width: 100%;
            height: 100%;
            font-family: "华文楷体";
            /*background: #000;*/
            overflow: hidden;
            visibility: hidden;
        }

        .title {
            position: relative;
            cursor: pointer;
            /*background: #333;*/
            width: 100%;
            color: #fff;
            font-family: "华文楷体";
            font-size: 20px;
            left: 0;
            height: 50;
            overflow: hidden;
        }

        .title_o {
            position: relative;
            cursor: pointer;
            background: #fff;
            width: 100%;
            color: #000;
            font-family: "华文楷体";
            font-size: 20px;
            left: 0;
            height: 25;
            overflow: hidden;
        }

        .text {
            position: relative;
            text-align: justify;
            margin: 0px;
            font-family: "华文楷体";
            /*text-indent:2em;*/
            font-size: 18px;
            color: #FFF;
            overflow: hidden;
            width: 100%;
            height: 100%
        }

        /*字颜色*/
    </style>


    <script type="text/javascript">
        var object = new Array();

        function Slide(N, oCont) {
            this.N = N;
            this.S = 1.1;
            this.object = new Array();
            this.CObj = function (parent, N) {

                this.parent = parent;
                this.N = N;
                this.obj = parent.frm[N];
                this.tit = this.obj.firstChild;
                this.div = this.obj.getElementsByTagName("div")[1];
                this.div.style.visibility = "hidden";
                this.y0 = N * 18;
                this.Y1 = this.y0;
                this.obj.style.top = this.y0;
                this.obj.style.height = parent.H - (parent.NF - 1) * 18 - 3;
                this.obj.style.visibility = "visible";
                this.obj.parent = this;
                this.run = false;
                this.move = function () {
                    with (this) {
                        dy = (y1 - y0) / parent.S;
                        if (Math.abs(dy) > .1) {
                            y0 += dy;
                            obj.style.top = Math.round(y0);
                            setTimeout("object[" + parent.N + "].object[" + N + "].move();", 16);
                        } else {
                            run = false;
                            if (dy > 0) div.style.visibility = "hidden";
                            else if (N > 0) parent.object[N - 1].div.style.visibility = "hidden";
                        }
                    }
                }
                this.obj.onmouseover = function () {
                    with (this.parent) {
                        if (!run) {
                            run = true;
                            div.style.visibility = "visible";
                            for (i = 0; i < parent.NF; i++) parent.object[i].tit.className = "title";
                            tit.className = "title_o";
                            for (i = 0; i <= N; i++) {
                                parent.object[i].y1 = i * 18;
                                parent.object[i].move();
                            }
                            for (i = N + 1; i < parent.NF; i++) {
                                parent.object[i].y1 = parent.H - (parent.NF - i) * 18;
                                parent.object[i].move();
                            }
                        }
                    }
                }
            }

            this.frm = document.getElementById(oCont);
            this.H = parseInt(this.frm.style.height);
            this.frm = this.frm.getElementsByTagName("span");
            this.NF = this.frm.length;
            for (i = 0; i < this.NF; i++) this.object[i] = new this.CObj(this, i);
            this.object[0].obj.onmouseover();
            this.S = 10;
        }

        onload = function () {
            object[0] = new Slide(0, "frames");
        }
    </script>


    <%--展开1--%>

</head>

<%--123--%>

<body class="loginBody">

<body>

<div class="container demo-1">
    <div class="content">
        <div id="large-header" class="large-header">


            <canvas id="demo-canvas"></canvas>
            <body21>
                <div style="position: absolute; left: 50%; top: 35%;">
                    <div id="frames"
                         style="overflow: hidden; position: absolute; width: 400px; height: 500px; left: -100px; top: -170px;">
  <span style="top: 0pt; height: 211px; visibility: visible;" class="link"><div class="title_o"></div>
   <div style="margin: 0px; overflow: hidden; position: relative; text-align: center;   top:10%; font-size: 32px; font-weight: bold; color: rgb(255, 255, 255);  visibility: visible;" class="text">
       欢迎使用<br>学院工作量<br>管理系统
   </div>
  </span>
                        <span style="top: 213px; height: 211px; visibility: visible;" class="link"><div class="title">声明</div>
   <div style="visibility: hidden;text-indent:2em;" class="text">
       学院工作量管理系统是源梦科技提供的一个集学院工作量导入、统计工作量绩效、展示工作量绩效于一体的工具。<br>
       注：本系统提供的所有资料均为系统作者提供及网友推荐发布，不得用于任何商业用途。

 </div>
  </span>
                        <span style="top: 231px; height: 211px; visibility: visible;" class="link"><div class="title">技术支持</div>
   <div style="visibility: hidden;" class="text">
       By 源梦科技团队
   </div>
  </span>
                        <span style="top: 249px; height: 211px; visibility: visible;" class="link"><div class="title">关于系统</div>
   <div style="visibility: hidden;" class="text">
系统当前版本为：V2.0
       <br>系统创建日期：2020年5月25日
       <br>系统启动测试日期：2020年6月20日
   </div>
  </span>
                        <span style="top: 285px; height: 211px; visibility: visible;" class="link"><div class="title">使用帮助</div>
   <div style="visibility: hidden;" class="text">
详细文件请联系作者获取！
   </div>
  </span>
                        <span style="top: 303px; height: 211px; visibility: visible;" class="link"><div
                                class="title">反馈</div>
   <div style="visibility: hidden;" class="text">
如使用过程中发现问题，请反馈到<br>QQ群：617935833（CHJY源梦科技）
       <br>感谢您的支持！
   </div>
  </span>
                        <span style="top: 321px; height: 211px; visibility: visible;" class="link"><div
                                class="title"></div>
   <div style="margin: 20px; overflow: hidden; position: relative; text-align: center; font-family: verdana; font-size: 32px; font-weight: bold; color: rgb(255, 255, 255); height: 90%; visibility: hidden;">
     The End
   </div>
  </span>
                    </div>
                </div>
            </body21>
            <form class="layui-form">
                <div class="login_face"><img src="${ctx}/resources/images/userface3.jpg" class="userAvatar"></div>
                <div class="layui-form-item input-item">
                    <label for="userName">用户名</label>
                    <input type="text" placeholder="请输入用户名" autocomplete="off" id="userName" name="loginname"
                           class="layui-input" lay-verify="required">
                </div>
                <div class="layui-form-item input-item">
                    <label for="password">密码</label>
                    <input type="password" placeholder="请输入密码" autocomplete="off" id="password" name="pwd"
                           class="layui-input" lay-verify="required">
                </div>
                <div class="layui-form-item input-item" id="imgCode">
                    <label for="code">验证码</label>
                    <input type="text" placeholder="请输入验证码" name="code" autocomplete="off" id="code"
                           class="layui-input">
                    <img src="${ctx}/login/getCode" onclick="this.src=this.src+'?'">
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn layui-block" lay-filter="login" lay-submit>登录</button>
                </div>


            </form>


        </div>

    </div>

</div><!-- /container -->
<script src="${ctx}/resources/Xjs/TweenLite.min.js"></script>
<script src="${ctx}/resources/Xjs/EasePack.min.js"></script>
<script src="${ctx}/resources/Xjs/rAF.js"></script>
<script src="${ctx}/resources/Xjs/demo-1.js"></script>
<%--<div style="text-align:center;">--%>
<%--</div>--%>


</body>
<script type="text/javascript" src="${ctx}/resources/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(['form', 'layer', 'jquery'], function () {
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer
        $ = layui.jquery;

        $(".loginBody .seraph").click(function () {
            layer.msg("这只是做个样式，至于功能，你见过哪个后台能这样登录的？还是老老实实的找管理员去注册吧", {
                time: 5000
            });
        })

        //登录按钮
        //登录按钮
        form.on("submit(login)", function (data) {


            console.log(data.field);
            var btn = $(this);
            //设置登录按钮  为不可点击
            btn.text("登录中...").attr("disabled", "disabled").addClass("layui-disabled");
            $.post("${ctx}/login/login", data.field, function (rs) {
                //设置登录按钮 恢复可点击   在前端防止 重复点击




                btn.text("登录").attr("disabled", false).removeClass("layui-disabled");
                layer.msg(rs.msg);
                if (rs.code != 200) {
                    layer.msg(rs.msg);
                } else {
                    //跳转到templates/system/index/index.html页面
                    layer.msg(rs.msg);
                    location.href = "${ctx}/sys/toIndex";
                }
            });
            return false;
        });

        //表单输入效果
        $(".loginBody .input-item").click(function (e) {
            e.stopPropagation();
            $(this).addClass("layui-input-focus").find(".layui-input").focus();
        })
        $(".loginBody .layui-form-item .layui-input").focus(function () {
            $(this).parent().addClass("layui-input-focus");
        })
        $(".loginBody .layui-form-item .layui-input").blur(function () {
            $(this).parent().removeClass("layui-input-focus");
            if ($(this).val() != '') {
                $(this).parent().addClass("layui-input-active");
            } else {
                $(this).parent().removeClass("layui-input-active");
            }
        })
    })

</script>
<script type="text/javascript" src="${ctx}/resources/js/cache.js"></script>
</body>
</html>
